//
//  IMService.h
//  ipjsua
//
//  Created by Andy on 16/5/18.
//  Copyright © 2016年 Teluu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <pjsua-lib/pjsua.h>

@interface IMService : NSObject
+ (IMService *)sharedInstance;

-(BOOL)IM_InitPJSIP;
-(BOOL)IM_RegisterWithServer:(NSString *)server name:(NSString *)name password:(NSString *)pwd;
-(void)IM_ReRegistrer;
-(BOOL)IM_DeleteCurAcc;
-(void)IM_StartTypingWithuri:(NSString *)uri;
-(void)IM_StopTypingWithuri:(NSString *)uri;
-(BOOL)IM_SendMSGWithuri:(NSString *)uri message:(NSString *)message;
-(BOOL)IM_MakeVideoWithuri:(NSString *)uri;
-(BOOL)IM_MakeAudioWithuri:(NSString *)uri;
-(void)IM_AnswerCall;
-(void)IM_HangUp;
-(void)IM_PreViewOnWithid:(int)dev_id;
-(void)IM_PreViewOffWithid:(int)dev_id;
-(void)IM_GetAllCodecInfo;
-(void)IM_SetCodecPriorityWithcodec:(NSString *)codec prio:(int)prio;
-(BOOL)IM_SetCodecFPSWithcodec:(NSString *)codec NUM:(int)NUM DEN:(int)DEN;
-(BOOL)IM_SetCodecBWWithcodec:(NSString *)codec AVG:(int)AVG MAX:(int)MAX;
-(BOOL)IM_SetCodecSizeWithcodec:(NSString *)codec Weight:(int)Weight Hight:(int)Hight;
-(void)IM_GetVideoCodecList;
-(void)IM_GetWinList;
-(void)IM_SwitchCaptureWithCapId:(int)CapId;
-(void)IM_ShowAllDevList;
-(int)getFrontCamera;


/*************************************************************************************************/
-(void)IM_RecvVideoCallWithfrom:(const pj_str_t *)from to:(const pj_str_t *)to;
-(void)IM_RecvAudioCallWithfrom:(const pj_str_t *)from to:(const pj_str_t *)to;
-(void)IM_RecvMsgWithfrom:(const pj_str_t *)from to:(const pj_str_t *)to text:(const pj_str_t *)text;
-(void)IM_RemoteIsTypingWithfrom:(const pj_str_t *)from to:(const pj_str_t *)to is_typing:(pj_bool_t)is_typing;
-(void)IM_RingStart;
-(void)IM_RingStop;
-(void)IM_LogInSuccess;
-(void)IM_LogOutSuccess;
-(void)IM_InviteDisconnectWithcallid:(int)callid code:(int)code status:(const pj_str_t *)status;
-(void)IM_RemoteViewWithview:(UIView *)view;
-(void)IM_LocaleViewWithview:(UIView *)view wid:(pjsua_vid_win_id)wid;

@end
